<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('feedback_records', function (Blueprint $table) {
            // 添加分数变化的分数（正数为加分，负数为扣分）
            $table->integer('score_change')->comment('分数变化（+加分，-扣分）');
            
            // 添加操作原因
            $table->string('reason')->nullable()->comment('操作原因');
            
            // 可以继续加更多字段，例如：
            // $table->text('notes')->nullable()->comment('备注');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('feedback_records', function (Blueprint $table) {
            $table->dropColumn(['score_change', 'reason']);
        });
    }
};
